﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TransCend.Result
{
    [Serializable]
    public class Result : IResult
    {
        // 错误消息
        private string messagestr = null;

        public int errorCode { set; get; }

        public string message
        {
            set { messagestr = value; }
            get { return messagestr == null ? "" : messagestr; }
        }

        public bool success { set; get; }

        public virtual object ToJsonObject()
        {
            return this;
        }

        public const int MOBILE_EXISTS_ERROR = -1;
        public const int EMAIL_EXISTS_ERROR = -2;
        public const int IP_ERROR = -3;
        public const int APPID_ERROR = -4;
        public const int MOBILE_ERROR = -5;
        public const int EMAIL_ERROR = -6;
        public const int DATA_ERROR = -7;
        public const int TOKEN_ERROR = -8;
        public const int USER_ERROR = -9;
        public const int WEIXIN_EXISTS = -10;
        public const int WEIXIN_NOT_EXISTS = -11;
        public const int GIFT_ERROR = -12;
        public const int GIFT_EXISTS = -13; //本月已兑换
        public const int GIFT_SCORCE_ERROR = -14; //积分不足

        public const int SEND_PWD_ERROR = -15; //发送密码频繁
    }
}
